home *** CD-ROM | disk | FTP | other *** search
- on BP_Preferences
- global gPref_path
- if the machineType = 256 then
- set x_lib to "BPXLIB.DLL"
- set pref_fileName to "BACKPACK.INI"
- else
- set x_lib to "BPXLIB.MAC"
- set pref_fileName to "BackPacker preferences"
- end if
- openXLib(the pathName & x_lib)
- set misc to MISC_X(mnew)
- if the machineType = 256 then
- set gPref_path to misc(mWindowsDirectory) & pref_fileName
- else
- if the machineType <> 256 then
- set gPref_path to misc(mPrefsFolder) & pref_fileName
- end if
- end if
- if not misc(mFileExists, gPref_path) then
- Write_Preferences("New")
- end if
- misc(mdispose)
- closeXLib(the pathName & x_lib)
- end
-
- on Write_Preferences mode
- global J, PNM, gPref_path, MAXPSNDS
- if the machineType = 256 then
- openXLib(the pathName & "FILEIO.DLL")
- end if
- set W to EMPTY
- if mode = "New" then
- set W to W & "BackPacker preferences version 1.0" & RETURN
- set P to RETURN & "[[],[],[]]" & RETURN
- set W to W & ".high scores" & RETURN & ".max aukt" & P & ".max towns" & P
- set W to W & ".max solve" & P & ".min days" & P
- set W to W & ".max days" & P & ".max assign" & P
- set fil to FileIO(mnew, "write", gPref_path)
- fil(mWriteString, W)
- fil(mSetFinderInfo, "TEXT", "BAPA")
- fil(mdispose)
- end if
- if the machineType = 256 then
- closeXLib(the pathName & "FILEIO.DLL")
- end if
- end
-